import { useGlobSetting } from './../hook/setting/index';
import { createRouter, createWebHistory } from 'vue-router';
import { handleRouter } from './routeInterception';
import genertorRoute from './routes';

const { path } = useGlobSetting();
const routes = genertorRoute() || [];
const router = createRouter({
  history: createWebHistory(path),
  routes,
});
handleRouter(router);
export default router;
